package com.moyou.weichat.dapter;

import android.graphics.Bitmap;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.View;
import com.chad.library.adapter.base.BaseViewHolder;
import com.moyou.weichat.R;
import com.moyou.weichat.bean.ChatTypeBean;
import com.moyou.weichat.utils.ImageUtils;

import java.util.List;

/**
 * Created by Administrator on 2017/11/10 0010.
 * sj: 2017年11月10日9:44:50
 * name ：ts
 * 用途： 适配器数据设置
 */

public class ChatAdpter extends BaseChatAdapter{

    public ChatAdpter(List<ChatTypeBean> data, int chatType, String userId, RecyclerView chatTypeBeenList) {
        super(data, chatType, userId, chatTypeBeenList);
    }

    //单聊左边文本设置
    @Override
    public void chatSignLeftSetTextUI(BaseViewHolder helper, ChatTypeBean item) {
        helper.setText(R.id.tv_ChatContent , item.getContent());
    }

    //单聊右边文本设置
    @Override
    public void chatSignRightSetTextUI(BaseViewHolder helper, ChatTypeBean item) {
        helper.setText(R.id.tv_ChatContent , item.getContent());
    }

    //单聊左边图片设置
    @Override
    public void chatSignLeftSetImageUI(BaseViewHolder helper, ChatTypeBean item) {
        ImageUtils.getInstance().setChatImage(helper.itemView.getContext(),item.getImageUrl(),helper.getView(R.id.chat_image_item));
    }

    //单聊右边设置
    @Override
    public void chatSignRightSetImageUI(BaseViewHolder helper, ChatTypeBean item) {
        com.moyou.weichat.utils.ImageUtils.getInstance().setChatImage(helper.itemView.getContext(),item.getImageUrl(),helper.getView(R.id.chat_image_item));
    }

    //单聊左边文本设置
    @Override
    public void chatSignLeftSetVideoUI(BaseViewHolder helper, ChatTypeBean item) {

    }

    //单聊左边文本设置
    @Override
    public void chatSignRightSetVideoUI(BaseViewHolder helper, ChatTypeBean item) {

    }

    //单聊左边文本设置
    @Override
    public void chatSignLeftSetVioceUI(BaseViewHolder helper, ChatTypeBean item) {

    }

    //单聊左边文本设置
    @Override
    public void chatSignRightSetVioceUI(BaseViewHolder helper, ChatTypeBean item) {

    }

    //单聊左边文本设置
    @Override
    public void chatSignLeftSetLocationUI(BaseViewHolder helper, ChatTypeBean item) {

    }

    //单聊左边文本设置
    @Override
    public void chatSignRightSetLocationUI(BaseViewHolder helper, ChatTypeBean item) {

    }

    //单聊左边文本设置
    @Override
    public void chatSignAllUI(BaseViewHolder helper, ChatTypeBean item) {
        helper.getView(R.id.tv_chatNmae).setVisibility(View.GONE);
        if (helper.getView(R.id.tv_groupNmae) != null) {
            helper.setVisible(R.id.tv_groupNmae, false);
        }
        setUpBaseView(helper , helper.getAdapterPosition() , item);
    }

    //单聊左边文本设置
    @Override
    public void chatGroupLeftSetTextUI(BaseViewHolder helper, ChatTypeBean item) {

    }

    //单聊左边文本设置
    @Override
    public void chatGroupRightSetTextUI(BaseViewHolder helper, ChatTypeBean item) {

    }

    //单聊左边文本设置
    @Override
    public void chatGroupLeftSetImageUI(BaseViewHolder helper, ChatTypeBean item) {

    }

    //单聊左边文本设置
    @Override
    public void chatGroupRightSetImageUI(BaseViewHolder helper, ChatTypeBean item) {

    }

    //单聊左边文本设置
    @Override
    public void chatGroupLeftSetVideoUI(BaseViewHolder helper, ChatTypeBean item) {

    }

    //单聊左边文本设置
    @Override
    public void chatGroupRightSetVideoUI(BaseViewHolder helper, ChatTypeBean item) {

    }

    //单聊左边文本设置
    @Override
    public void chatGroupLeftSetVioceUI(BaseViewHolder helper, ChatTypeBean item) {

    }

    //单聊左边文本设置
    @Override
    public void chatGroupRightSetVioceUI(BaseViewHolder helper, ChatTypeBean item) {

    }

    //单聊左边文本设置
    @Override
    public void chatGroupLeftSetLocationUI(BaseViewHolder helper, ChatTypeBean item) {

    }

    //单聊左边文本设置
    @Override
    public void chatGroupRightSetLocationUI(BaseViewHolder helper, ChatTypeBean item) {

    }

    //单聊左边文本设置
    @Override
    public void chatGroupAllUI(BaseViewHolder helper, ChatTypeBean item) {

    }

}
